﻿CREATE PROCEDURE [dbo].[proc_ContactPerson_GetList_Customer]
	(
		@CustomerId uniqueidentifier
	)
AS
	Select Id,
	CustomerId,
	PersonId,
	ZName,
	Sex,
	[Position],
	OfficeTel,
	HomeTel,
	Mobile,
	Email,
	CreateDate,
	IsMain,
	PersonTypeId,
	(Select Title From Contact_Type Where Id=ContactPerson.PersonTypeId) As PersonType,
	Age,
	Weixin
	From ContactPerson Where CustomerId=@CustomerId Order by IsMain DESC,CreateDate Desc